package fragment.tabhostFragment;

import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.widget.ImageView;

import com.lanou.horo.myapplication.R;

import fragment.AbsBaseFragment;
import utils.adapter.CustomPageTitleAdapter;
import utils.adapter.DownloadPageTitleAdapter;

/**
 * 下载听
 * Created by dllo on 15/11/17.
 */
public class DownloadPageFragment extends AbsBaseFragment {
    private TabLayout tabLayout;
    private ViewPager viewPager;

    @Override
    protected int getLayoutView() {
        return R.layout.fragment_page_download;
    }

    @Override
    protected void initView() {
        tabLayout = findView(R.id.downloadPageTabLayout);
        viewPager = findView(R.id.downloadPageViewPager);
    }

    @Override
    protected void initData() {
        DownloadPageTitleAdapter adapter = new DownloadPageTitleAdapter(getFragmentManager());
        viewPager.setAdapter(adapter);
        tabLayout.setupWithViewPager(viewPager);
    }
}
